package Message.Public
{
    import Engine.RMI.*;
    import Framework.Serialize.*;

    public class ECareer extends Object
    {
        public var __value:int;
        private static var __values:Array = [];
        public static const _ECareerNo:int = 0;
        public static const ECareerNo:ECareer = new ECareer(_ECareerNo);
        public static const _ECareerWarrior:int = 1;
        public static const ECareerWarrior:ECareer = new ECareer(_ECareerWarrior);
        public static const _ECareerArcher:int = 2;
        public static const ECareerArcher:ECareer = new ECareer(_ECareerArcher);
        public static const _ECareerFireMage:int = 4;
        public static const ECareerFireMage:ECareer = new ECareer(_ECareerFireMage);
        public static const _ECareerDoctor:int = 8;
        public static const ECareerDoctor:ECareer = new ECareer(_ECareerDoctor);
        public static const _ECareerWarriorD:int = 16;
        public static const ECareerWarriorD:ECareer = new ECareer(_ECareerWarriorD);
        public static const _ECareerStabber:int = 32;
        public static const ECareerStabber:ECareer = new ECareer(_ECareerStabber);
        public static const _ECareerIceMage:int = 64;
        public static const ECareerIceMage:ECareer = new ECareer(_ECareerIceMage);
        public static const _ECareerPriest:int = 128;
        public static const ECareerPriest:ECareer = new ECareer(_ECareerPriest);
        public static const _ECareerNewPlayer:int = 256;
        public static const ECareerNewPlayer:ECareer = new ECareer(_ECareerNewPlayer);
        public static const _ECareerPetPhysical:int = 512;
        public static const ECareerPetPhysical:ECareer = new ECareer(_ECareerPetPhysical);
        public static const _ECareerPetMagic:int = 1024;
        public static const ECareerPetMagic:ECareer = new ECareer(_ECareerPetMagic);
        public static const _ECareerPetPhysique:int = 2048;
        public static const ECareerPetPhysique:ECareer = new ECareer(_ECareerPetPhysique);

        public function ECareer(param1:int)
        {
            this.__value = param1;
            __values[param1] = this;
            
        }

        public function value() : int
        {
            return this.__value;
        }

        public function equals(param1:Object) : Boolean
        {
            if (param1 == this)
            {
                return true;
            }
            var _loc_2:* = param1 as ERMICallModel;
            if (_loc_2 == null)
            {
                return false;
            }
            return this.__value == _loc_2.value();
        }

        public function hashCode() : int
        {
            return 5 * this.__value;
        }

        public function __write(param1:SerializeStream) : void
        {
            param1.writeShort(this.__value);
            
        }

        public static function convert(param1:int) : ECareer
        {
            return __values[param1];
        }

        public static function __read(param1:SerializeStream) : ECareer
        {
            var _loc_2:* = param1.readShort();
            if (_loc_2 < 0 || _loc_2 >= 2049)
            {
                throw new MarshalException();
            }
            return ECareer.convert(_loc_2);
        }

    }
}
